<template>
  <div class="recommend">
    <!-- 自定义导航栏 -->
    <gh-navbar id="navbar" :showback="true" title="推荐律师" />
    <!-- 律师卡片 -->
    <div class="card" v-for="(item, index) in lawer" :key="index">
      <gh-lawer-card :item="item" />
    </div>
    <template v-if="lawer.length == 0">
      <div class="none">
        <image class="none-img" :src="imgBaseUrl + 'none.png'" mode="widthFix" />
      </div>
    </template>
  </div>
</template>
<script>
export default {
  data() {
    return {
      lawer: [],
      imgBaseUrl: this.$store.state.imgBaseUrl
    };
  },
  created() {
    let that = this;
    uni.showLoading({
      title: "加载中"
    });
    // 律师卡片
    uni.request({
      url: that.$store.state.baseUrl + "member.index",
      data: {
        op: "getLawyerList",
        page: 1,
        psize: 15
      },
      success(res) {
        that.lawer = res.data.data.list;
        uni.hideLoading();
      }
    });
  }
};
</script>
<style lang='less' scoped>
@import url("../../common/util.less");
.recommend {
  padding: 25rpx;
  padding-right: 0;
  .card {
    margin-bottom: 25rpx;
  }
  .none {
    font-size: 30rpx;
    color: @font-color;
    text-align: center;
    .none-img {
      width: 50%;
      margin-top: 100rpx;
    }
  }
}
</style>